package com.ruoyi.system.service.customer.impl;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.supe.Commission;
import com.ruoyi.system.mapper.zhuangxiumapper.CommissionMapper;
import com.ruoyi.system.response.Result;
import com.ruoyi.system.response.ResultCode;
import com.ruoyi.system.service.customer.CommissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class CommissionServiceImpl implements CommissionService {


    @Autowired(required = false)
    private CommissionMapper commissionMapper;

    /**
     * 查询超管分销佣金
     *
     * @param commissionId 超管分销佣金ID
     * @return 超管分销佣金
     */
    @Override
    public Commission selectCommissionById(Long commissionId)
    {
        return commissionMapper.selectCommissionById(commissionId);
    }

    /**
     * 查询超管分销佣金列表
     *
     * @param commission 超管分销佣金
     * @return 超管分销佣金
     */
    @Override
    public List<Commission> selectCommissionList(Commission commission)
    {
        return commissionMapper.selectCommissionList(commission);
    }

    /**
     * 新增超管分销佣金
     *
     * @param commission 超管分销佣金
     * @return 结果
     */
    @Override
    public int insertCommission(Commission commission)
    {
        return commissionMapper.insertCommission(commission);
    }

    /**
     * 修改超管分销佣金
     *
     * @param commission 超管分销佣金
     * @return 结果
     */
    @Override
    public int updateCommission(Commission commission)
    {
        return commissionMapper.updateCommission(commission);
    }

    /**
     * 批量删除超管分销佣金
     *
     * @param commissionIds 需要删除的超管分销佣金ID
     * @return 结果
     */
    @Override
    public int deleteCommissionByIds(Long[] commissionIds)
    {
        return commissionMapper.deleteCommissionByIds(commissionIds);
    }

    /**
     * 删除超管分销佣金信息
     *
     * @param commissionId 超管分销佣金ID
     * @return 结果
     */
    @Override
    public int deleteCommissionById(Long commissionId)
    {
        return commissionMapper.deleteCommissionById(commissionId);
    }
}
